Though we only have four valid types now, the new type may be added in future.
It's better to remove the check and only deal with the type that we can
recognize.
Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Signed-off-by: Xiantao Zhang <xiantao.zhang@Intel.com>
Acked-by: Keir Fraser <keir@xen.org>
Add log message for this case.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
while ( start < end )
{
scope = start;
- if ( (scope->length < MIN_SCOPE_LEN) ||
- (scope->entry_type >= ACPI_DMAR_SCOPE_TYPE_RESERVED) )
+ if ( scope->length < MIN_SCOPE_LEN )
{
dprintk(XENLOG_WARNING VTDPREFIX, "Invalid device scope.\n");
return -EINVAL;
}
break;
+
+ default:
+ if ( iommu_verbose )
+ printk(XENLOG_WARNING VTDPREFIX "Unknown scope type %#x\n",
+ acpi_scope->entry_type);
+ start += acpi_scope->length;
+ continue;
}
scope->devices[didx++] = PCI_BDF(bus, path->dev, path->fn);
start += acpi_scope->length;
ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
ACPI_DMAR_SCOPE_TYPE_HPET = 4,
- ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
};
struct acpi_dmar_pci_path {